﻿using Digitalmes.Domain.Sys;

namespace Digitalmes.Sugar.SeedData;

internal sealed class SysRoleSeedData : ISqlSugarEntitySeedData<SysRole>
{
    [IgnoreUpdate]
    public IEnumerable<SysRole> HasData()
    {
        return new[]
        {
            new SysRole { Id = 1300000000001, TenantId = 0, Name = "管理员", ParentId = 0, ParentIdList = new() { 1300000000001 }, Layer = 1, Number = "001", IsSystem = false, Status = true, MaxLength = 0, Sort = 1, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000002, TenantId = 0, Name = "系统管理员", ParentId = 1300000000001, ParentIdList = new() { 1300000000001, 1300000000002 }, Layer = 2, Number = "002", IsSystem = true, Status = true, MaxLength = 1, Sort = 2, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000003, TenantId = 0, Name = "业务管理员", ParentId = 1300000000001, ParentIdList = new() { 1300000000001, 1300000000003 }, Layer = 2, Number = "003", IsSystem = false, Status = true, MaxLength = 0, Sort = 3, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },

            new SysRole { Id = 1300000000011, TenantId = 0, Name = "操作员", ParentId = 0, ParentIdList = new() { 1300000000011 }, Layer = 1, Number = "011", IsSystem = false, Status = true, MaxLength = 0, Sort = 11, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000012, TenantId = 0, Name = "工艺人员", ParentId = 1300000000011, ParentIdList = new() { 1300000000011, 1300000000012 }, Layer = 2, Number = "012", IsSystem = false, Status = true, MaxLength = 0, Sort = 12, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000013, TenantId = 0, Name = "生产人员", ParentId = 1300000000011, ParentIdList = new() { 1300000000011, 1300000000013 }, Layer = 2, Number = "013", IsSystem = false, Status = true, MaxLength = 0, Sort = 13, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000014, TenantId = 0, Name = "质检员", ParentId = 1300000000011, ParentIdList = new() { 1300000000011, 1300000000014 }, Layer = 2, Number = "014", IsSystem = false, Status = true, MaxLength = 0, Sort = 14, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
            new SysRole { Id = 1300000000015, TenantId = 0, Name = "返修人员", ParentId = 1300000000011, ParentIdList = new() { 1300000000011, 1300000000015 }, Layer = 2, Number = "015", IsSystem = false, Status = true, MaxLength = 0, Sort = 15, Console = "work", CreateUser = "admin", CreateTime = DateTime.Parse("2022-02-22 00:00:00") },
        };
    }
}
